/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tpgen.patterns;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/**
 *
 * @author shanki
 */
public class PatternTransformation implements Iterable<Transformation> {
    private List<Transformation> transformations = new ArrayList<Transformation>();
    
    public void add(Transformation transformation) {
        transformations.add(transformation);
    }
    
    public Transformation get(int index) {
        return transformations.get(index);
    }
    
    public int size() {
        return transformations.size();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        
        for (Transformation transformation : transformations) {
            sb.append(transformation);
        }
        
        return sb.toString();
    }

    @Override
    public Iterator<Transformation> iterator() {
        return transformations.iterator();
    }
    
    
}
